# wherever your compiler is
CC=gcc

# use this if linking to libjpeg
LIBJPEG=-L../jpeg-6b -ljpeg
CFLAGS=-I../jpeg-6b -DHAVELIBJPEG
MOTION=motion.o lowres.o
LDFLAGS=-lm
#comment out the above if you don't have libjpeg

# had to add this for OS X 10.4 and Linux gcc/libc for gettimeofday()
CFLAGS+=-DTZP

# Turn on AUDIO capture
CFLAGS+=-DGETAUDIO
AUDIO=ulaw.o

# added this for Windows (MINGW)
#CFLAGS+=-DWINSOCK
#LDFLAGS+=-lws2_32

# Enable debug into in binary and compiler warnings
CFLAGS += -Wall -Wextra -g

all: spykee

spykee: spykee.o $(MOTION) $(AUDIO)
	$(CC) -o spykee spykee.o $(MOTION) $(AUDIO) $(LIBJPEG) $(LDFLAGS)

clean:
	rm -f spykee spykee.o $(MOTION) $(AUDIO)
